package com.dubbo.userquery;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.dubbo.mysql.Distrmysql;

public class LuncherConsumer {
	public static void main(String[] args) throws InterruptedException {
		LuncherConsumer luncher = new LuncherConsumer();
		luncher.start();
	}

	void start() {
		String configLocation = "conf/dubbo-consumer.xml";
		ApplicationContext context = new ClassPathXmlApplicationContext(configLocation);
		DemoService ds = (DemoService) context.getBean("demoService");
		String[] names = context.getBeanDefinitionNames();
		System.out.print("Beans:");
		for (String string : names) {
			System.out.print(string);
			System.out.print(",");
		}
		System.out.println();

	}
}
